(function () {
  function Get(url, data) {
    return new Promise((resolve, reject) => {
      let request = new XMLHttpRequest()
      request.open('get', url)
      request.setRequestHeader('Authorization', 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Im95WXdaU0xDTFZWUEhkVnAwalhJY0xOcEduNmRNQ3VtbFktNndTZW5tRm8ifQ.eyJzdWIiOiJ0ZXN0aW5nIiwibmFtZSI6Inlhb3h1X3p6IiwiaXNzIjoic2VjdXJlLmlzdGlvLmlvIiwiYXVkIjoidGVzdCIsInJlbSI6MCwiZXhwIjoxNjMzNzE5NjkzLCJpYXQiOjE2MzM2NzY0OTMsImlkIjoiOTY1MSJ9.Or-O5R5rByS1y-3aRx-KGPAv9MWQGZ5rgEqUCYRNQSVEcYB2-2BlGsPtPwI3j5cLuAe5pymL9TcCxdEzHt1ygnL2_1L4eGM_4cgJEkmzAlWZwFCwCsV9EmiN2crqcxAQpAN2hm-N__ipTGWptXzJd-PTqAxqq4S52Iu_afnVX1lbmHf1ZHSKrMdEU8CrvRbwdcTJDXZxr7Xt6AM4UHGgpId_00Yo-CJUQgtntO9N5NZIMl0IaZb3NDyhwRfdOj4KkmDbBMBK8p4p-5SADkGpK-VvrLaMUaqwSyKpSOARv82Vt43OxRNg682rU6Hf74rPXCog3Jz_p9algLETH7KdNw')
      request.onreadystatechange = function () {
        if (request.readyState === 4) {
          resolve(request.response)
        }
      }
      request.send(data)
    })
  }

  Get('https://pa-api.ctbiyi.cn/api/support/listComponentExcel?&page=0&size=20&startTime=2021-01-01+00:00:00&endTime=2021-10-08+00:00:00&province=&cmptName=', null).then(res => {
    console.log(res)
  })
})()
